package cn.flightcloud.batch;

import java.util.List;

import org.openstack4j.api.OSClient;
import org.openstack4j.api.compute.ComputeService;
import org.openstack4j.model.compute.Server;
import org.openstack4j.openstack.OSFactory;

public class Openstack {

	public static void main(String[] args) {
		OSClient os = OSFactory.builderV2()
	            .endpoint("http://127.0.0.1:5000/v2.0")
	            .credentials("admin", "test")
	            .tenantName("admin")
	            .authenticate();
		ComputeService computeService = os.compute();
		List<? extends Server> serverList = computeService.servers().list();
		for (Server server : serverList) {
			
		}
	}

}
